<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="fragments/_header :: _head('添加用户')"></head>
<body>
<div class="ok-body">
    <form class="layui-form layui-form-pane ok-form">
        <div class="layui-form-item">
            <label class="layui-form-label">部门</label>
            <div class="layui-input-block">
                <input id="deptId" type="text" name="deptId" autocomplete="off" class="layui-hide" lay-verify="required"  th:value="${sysDept.id}">
                <input id="deptName" name="deptName" th:value="${sysDept.name}" class="layui-input" type="text" lay-filter="deptTree" readonly="true">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <input type="text" name="username"  th:value="${sysUser.username}" placeholder="请输入用户名" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">真实姓名</label>
            <div class="layui-input-block">
                <input type="text" name="name"  th:value="${sysUser.name}" placeholder="请输入真实姓名" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="password" name="password"  th:value="${sysUser.password}" placeholder="请输入密码" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">确认密码</label>
            <div class="layui-input-block">
                <input type="password" name="password2"  th:value="${sysUser.password}" placeholder="请输入确认密码" autocomplete="off" class="layui-input" lay-verify="required">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-block">
                <input type="text" name="mobile"  th:value="${sysUser.mobile}" placeholder="请输入电话" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">角色</label>
            <div class="layui-input-block" th:each="r:${role}">
                <input type="checkbox" name="roleIds" th:value="${r.id}" th:text="${r.name}" th:checked="${sysUser.roleIds.contains(r.id)}">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="add">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<!--js逻辑-->
<div th:include="fragments/_footer :: _footer"></div>
<script src="/js/system/user/edit.js"></script>
</body>
</html>